package com.objects;

import android.os.Parcel;
import android.os.Parcelable;

public class Contact implements Parcelable {
	private long ID;
	private String name;
	private String emailAddress;
	private String firstName;
	private String lastName;
	private String countryCode;

	public long getID() {
		return ID;
	}

	public void setID(long iD) {
		ID = iD;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getEmailAddress() {
		return emailAddress;
	}

	public void setEmailAddress(String emailAddress) {
		this.emailAddress = emailAddress;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	public Contact(Parcel in) {
		readFromParcel(in);
	}

	public Contact() {
	}

	@Override
	public String toString() {
		return name;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	@Override
	public void writeToParcel(Parcel out, int flags) {
		out.writeLong(ID);
		out.writeString(name);
		out.writeString(emailAddress);
	}

	protected void readFromParcel(Parcel in) {
		ID = in.readLong();
		name = in.readString();
		emailAddress = in.readString();
	}

	public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
		public Contact createFromParcel(Parcel in) {
			return new Contact(in);
		}

		public Contact[] newArray(int size) {
			return new Contact[size];
		}
	};

	public String getCountryCode() {
		return countryCode;
	}

	public void setCountryCode(String countryCode) {
		this.countryCode = countryCode;
	}

}
